home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / developer-tools / assembler / amiga-flight / installation / flight-install next >
Encoding:
Text File  |  1996-02-26  |  28.1 KB  |  1,054 lines

  1. ; $VER: FlightInstall 1.2 (13.06.94)
  2. ; Script to install XCNT AmigaFlight 1.2 by Andrew Duffy
  3. ; Installer is Copyright 1991-1993 Commodore-Amiga, Inc.
  4.  
  5. ;=============================================================================
  6. ; Start of script !
  7.  
  8. (Complete 0)
  9.  
  10. ;=============================================================================
  11. ; Work out where we are being installed from
  12.  
  13. (set @default-src (expandpath "/"))
  14. (set @default-vol (expandpath ":"))
  15. (set @default-vol (substr @default-vol 0 (- (strlen @default-vol) 1)))
  16. (set @default-dest "Work:")
  17.  
  18. ;=============================================================================
  19. ; Version numbers
  20.  
  21. (set kick-ver (/ (getversion) 65536))
  22. (set kick-ver3 39)
  23.  
  24. (set flight-vernum (getversion (tackon @default-src "AmigaFlight")))
  25. (set flight-ver (/ flight-vernum 65536))
  26. (set flight-rev (- flight-vernum (* flight-ver 65536)))
  27.  
  28. (set flightlib-vernum (getversion (tackon @default-src "Libs/amigaflight.library")))
  29. (set flightlib-ver (/ flightlib-vernum 65536))
  30. (set flightlib-rev (- flightlib-vernum (* flightlib-ver 65536)))
  31.  
  32. (set flighthelp-vernum (getversion (tackon @default-src "Help/AmigaFlight.guide")))
  33. (set flighthelp-ver (/ flighthelp-vernum 65536))
  34. (set flighthelp-rev (- flighthelp-vernum (* flighthelp-ver 65536)))
  35.  
  36. (set xasm-vernum (getversion (tackon @default-src "C/xasm")))
  37. (set xasm-ver (/ xasm-vernum 65536))
  38. (set xasm-rev (- xasm-vernum (* xasm-ver 65536)))
  39.  
  40. (set install-vernum (getversion (tackon @default-src "Installation/Flight-Install")))
  41. (set install-ver (/ install-vernum 65536))
  42. (set install-rev (- install-vernum (* install-ver 65536)))
  43.  
  44. ;=============================================================================
  45. ; English strings (the default)
  46.  
  47. (set #bad-kick
  48. (cat "You must be using at least Kickstart 2.04 to install XCNT AmigaFlight."))
  49.  
  50. (set #introduction
  51. (cat ("\n\nThis program lets you install XCNT's AmigaFlight version %ld.%ld " flight-ver flight-rev)
  52.     "onto either a hard disk or a single floppy disk."))
  53.  
  54. (set #version-help
  55. (cat "Release versions for this distribution set are :\n\n\n"
  56.     ("AmigaFlight Executable %ld.%ld\n\n" flight-ver flight-rev)
  57.     ("AmigaFlight Library %ld.%ld\n\n" flightlib-ver flightlib-rev)
  58.     ("AmigaFlight Help %ld.%ld\n\n" flighthelp-ver flighthelp-rev)
  59.     ("XCNT Pre-Processor (xasm) %ld.%ld\n\n" xasm-ver xasm-rev)
  60.     ("Installation Script %ld.%ld" install-ver install-rev)))
  61.  
  62. (set #ask-install-type
  63. (cat "What type of installation do you require?"))
  64. (set #hard-disk
  65. (cat "Hard Disk"))
  66. (set #floppy-disk
  67. (cat "Floppy Disk"))
  68. (set #ask-install-help
  69. (cat "Selecting Hard Disk will install XCNT AmigaFlight on your hard disk.  "
  70.     "You will be asked what directory or partition you would like to "
  71.     "install it on.  The default is Work:.  A directory called 'AmigaFlight' "
  72.     "will be created at your chosen destination. \n\n"
  73.     "Selecting Floppy Disks will install XCNT AmigaFlight on a single "
  74.     "floppy disk.\n"))
  75.  
  76. (set #ask-disk1
  77. (cat "\n\nPlease insert volume "))
  78. (set #ask-disk2
  79. (cat " in any drive."))
  80.  
  81. (set #original-disks
  82. (cat "\nTo install XCNT AmigaFlight onto floppy disk you will need your "
  83.     "original Workbench disks (supplied with your computer).  If you do "
  84.     "not have them to hand, now is a good time to go and find them.\n"))
  85.  
  86. (set #ask-stand-alone
  87. (cat "Do you wish the disk to be created as a bootable, working environment, "
  88.     "stand-alone disk?"))
  89. (set #ask-stand-help
  90. (cat "Selecting Yes will create a complete working environment on the "
  91.     "disk and set it up as bootable.\n\nSelecting No will merely copy the "
  92.     "AmigaFlight package to the disk."))
  93.  
  94. (set #ask-wbdisk-help
  95. (cat "An offical Workbench disk is needed to complete this installation.  "
  96.     "It will be used to create a bootable disk for XCNT AmigaFlight."))
  97.  
  98. (set #ask-storage-help
  99. (cat "The Workbench 3 storage disk is needed to install the DOSDrivers "
  100.     "for reading PC disks, and to install a gb keymap."))
  101.  
  102. (set #ask-destination
  103. (cat "Please select the directory where you would like to install "
  104.     "XCNT AmigaFlight."))
  105. (set #ask-dest-help
  106. (cat "Choose a destination partition or directory to contain XCNT AmigaFlight.  "
  107.     "The install program will create a directory called 'AmigaFlight' in "
  108.     "your chosen destination and copy AmigaFlight to it."))
  109. (set #installed-mes
  110. (cat "\n\nXCNT AmigaFlight will be installed in\n\n"))
  111.  
  112. (set #select-drive
  113. (cat "Select a drive that is to be used as the destination."))
  114. (set #select-drive-help
  115. (cat "You need to choose which floppy drive to use for the target disk.  "
  116.     "The disk that you insert will be formatted and all data will be destroyed."))
  117.  
  118. (set #insert-disk
  119. (cat "Insert a new disk in DRIVE "))
  120. (set #insert-disk-mes1
  121. (cat ", wait for the disk light to go off, then click Proceed.\n\n"
  122.     "For the fewest number of disk swaps, leave the destination disk "
  123.     "in drive "))
  124. (set #insert-disk-mes2
  125. (cat " and use the other drive(s) for the Install disk and Workbench disks."))
  126.  
  127. (set #format-mes
  128. (cat "Formatting disk in "))
  129.  
  130. (set #creating-dirs
  131. (cat "Creating system directories on target disk."))
  132.  
  133. (set #copying-c
  134. (cat "Copying C commands to target disk."))
  135.  
  136. (set #copying-libs
  137. (cat "Copying libraries to target disk.")) 
  138.  
  139. (set #copying-handlers
  140. (cat "Copying handlers to target disk."))
  141.  
  142. (set #copying-devices
  143. (cat "Copying devices to target disk."))
  144.  
  145. (set #copying-system
  146. (cat "Copying system files to target disk."))
  147.  
  148. (set #copying-utils
  149. (cat "Copying utilities to target disk."))
  150.  
  151. (set #ask-parts
  152. (cat "Select the parts of AmigaFlight you would like to install"))
  153. (set #amigaflight
  154. (cat "AmigaFlight Control Program"))
  155. (set #include-assem
  156. (cat "Includes and Assembling Tools"))
  157. (set #help-files
  158. (cat "AmigaGuide® Help Files"))
  159. (set #examples
  160. (cat "Example Files"))
  161. (set #ask-parts-help
  162. (cat "You may choose to install only a part of the AmigaFlight system. "
  163.     "These parts are :\n\n"
  164.     "AmigaFlight Control Program -\nSelecting this item installs the main "
  165.     "part of AmigaFlight and the amigaflight.library.  You should always "
  166.     "select this item the first time you install AmigaFlight.\n\n"
  167.     "Includes and Assembling Tools -\nSelecting this item installs the "
  168.     "include files and tools required to assemble any of your own work.\n\n"
  169.     "AmigaGuide® Help Files -\nSelecting this item installs several "
  170.     "AmigaGuide documents that are used as online help.\n"
  171.     "On Workbench 2 machines, it also installs the Commodore "
  172.     "shared library 'AmigaGuide.library' in your LIBS: drawer, and installs "
  173.     "the 'AmigaGuide®' hypertext browser.\n\n"
  174.     "Example Files -\nSelecting this item installs a few example source "
  175.     "and object files for you to try out.\n"))
  176.  
  177. (set #dos-error-mes
  178. (cat "Dos Error %ld detected whilst copying %s"))
  179. (set #dos-error-mes2
  180. (cat "Dos Error %ld detected whilst modifying %s"))
  181.  
  182. (set #working-control
  183. (cat ("Installing AmigaFlight %ld.%ld Program" flight-ver flight-rev)))
  184. (set #working-aflightlib
  185. (cat ("Installing AmigaFlight %ld.%ld Library" flightlib-ver flightlib-rev)))
  186. (set #working-lowlevellib
  187. (cat "Installing LowLevel Library"))
  188.  
  189. (set #working-includes
  190. (cat "Installing AmigaFlight Includes"))
  191. (set #working-tools
  192. (cat "Installing AmigaFlight Assembling Tools"))
  193.  
  194. (set #working-aguidehelp
  195. (cat ("Installing AmigaFlight %ld.%ld Help" flighthelp-ver flighthelp-rev)))
  196. (set #working-aguidelib
  197. (cat "Installing AmigaGuide® Library"))
  198. (set #working-aguideview
  199. (cat "Installing AmigaGuide® Viewer"))
  200.  
  201. (set #working-examples
  202. (cat ("Installing AmigaFlight %ld.%ld Examples" flight-ver flight-rev)))
  203.  
  204. (set #working-startup
  205. (cat ("Adding AmigaFlight %ld.%ld assignment to User-Startup" flight-ver flight-rev)))
  206. (set #assign-mes1
  207. (cat "The following assignment has been created :\n\n"))
  208. (set #assign-mes2
  209. (cat "\n\nDo you want this to be added to your user-startup?"))
  210.  
  211. (set #exit-mes
  212. (cat "XCNT wish you hours of fun with AmigaFlight, and remember, if you "
  213.     "get stuck, read the help!"))
  214.  
  215. ;=============================================================================
  216. ; Other languages
  217.  
  218.  
  219.  
  220. ;=============================================================================
  221. ;=============================================================================
  222. ;=============================================================================
  223. ; make sure we are running under at least V37
  224.  
  225. (if (< kick-ver 37)
  226. (
  227.     (abort #bad-kick)
  228. ))
  229.     
  230. ;=============================================================================
  231. ; introduce ourselves
  232.  
  233. (message #introduction
  234.     (help #version-help)
  235. )
  236.  
  237. ;=============================================================================
  238. ; welcome message and installation mode requester
  239.  
  240. (welcome)
  241.  
  242. ;=============================================================================
  243. ; what type of installation is required?
  244.  
  245. (set install-type
  246.     (askchoice
  247.         (prompt #ask-install-type)
  248.         (choices #hard-disk #floppy-disk)
  249.         (help #ask-install-help)
  250.         (default 0)
  251.     )
  252. )
  253.  
  254.  
  255.  
  256. ;=============================================================================
  257. ;=============================================================================
  258. ;=============================================================================
  259. ; Hard Disk Installation.
  260.  
  261. (if (= install-type 0)
  262. (
  263.     (set main-dest (askdir
  264.         (prompt #ask-destination)
  265.         (default @default-dest)
  266.         (help #ask-dest-help)
  267.     ))
  268.     (set flight-dest (tackon main-dest "AmigaFlight"))
  269.     (set @default-dest flight-dest)
  270.     (message  #installed-mes flight-dest)
  271.  
  272. ;=============================================================================
  273. ; create the destination directory
  274.  
  275.     (makedir(@default-dest)
  276.             (infos)
  277.             (safe)
  278.     )
  279.     (Complete 5)
  280.  
  281. ;=============================================================================
  282. ; find out which parts to install
  283.  
  284.     (set parts (askoptions
  285.         (prompt #ask-parts)
  286.         (choices #amigaflight #include-assem #help-files #examples)
  287.         (help #ask-parts-help)
  288.     ))
  289.     (Complete 10)
  290.  
  291. ;=============================================================================
  292. ; copy main control program, amigaflight.library, and lowlevel.library
  293.  
  294.     (if (IN parts 0)
  295.     (
  296.         (set error (trap 4
  297.             (working #working-control)
  298.             (copyfiles
  299.                 (source (tackon @default-src "AmigaFlight"))
  300.                 (dest @default-dest)
  301.                 (infos)
  302.             )
  303.         ))
  304.         (if (> error 0) (message (#dos-error-mes @ioerr "AmigaFlight")))
  305.         (Complete 15)
  306.  
  307.         (set error (trap 4
  308.             (copyfiles
  309.                 (source (tackon @default-src "FlightPrefs"))
  310.                 (dest @default-dest)
  311.                 (infos)
  312.             )
  313.         ))
  314.         (if (> error 0) (message (#dos-error-mes @ioerr "FlightPrefs")))
  315.         (Complete 20)
  316.  
  317.         (set error (trap 4
  318.             (working #working-aflightlib)
  319.             (copylib
  320.                 (source (tackon @default-src "Libs/amigaflight.library"))
  321.                 (dest "Libs:")
  322.             )
  323.         ))
  324.         (if (> error 0) (message (#dos-error-mes @ioerr "amigaflight.library")))
  325.  
  326.         (set error (trap 4
  327.             (working #working-lowlevellib)
  328.             (copylib
  329.                 (source (tackon @default-src "Libs/lowlevel.library"))
  330.                 (dest "Libs:")
  331.             )
  332.         ))
  333.         (if (> error 0) (message (#dos-error-mes @ioerr "lowlevel.library")))
  334.         (Complete 25)
  335.     ))
  336.  
  337. ;=============================================================================
  338. ; copy includes and assembling tools
  339.  
  340.     (if (IN parts 1)
  341.     (
  342.         (set error (trap 4
  343.             (working #working-includes)
  344.             (copyfiles
  345.                 (source (tackon @default-src "Includes"))
  346.                 (dest (tackon @default-dest "Includes"))
  347.                 (all)
  348.             )
  349.         ))
  350.         (if (> error 0) (message (#dos-error-mes @ioerr "Includes")))
  351.         (Complete 30)
  352.  
  353.         (set error (trap 4
  354.             (working #working-tools)
  355.             (copyfiles
  356.                 (source (tackon @default-src "C/A68k"))
  357.                 (dest "C:")
  358.             )
  359.         ))
  360.         (if (> error 0) (message (#dos-error-mes @ioerr "A68k")))
  361.         (Complete 35)
  362.  
  363.         (set error (trap 4
  364.             (copyfiles
  365.                 (source (tackon @default-src "C/xasm"))
  366.                 (dest "C:")
  367.             )
  368.         ))
  369.         (if (> error 0) (message (#dos-error-mes @ioerr "xasm")))
  370.         (Complete 40)
  371.     ))
  372.  
  373. ;=============================================================================
  374. ; copy amigaguide help files and amigaguide.library
  375.  
  376.     (if (IN parts 2)
  377.     (
  378.         (set error (trap 4
  379.             (working #aguide-help)
  380.             (copyfiles
  381.                 (source (tackon @default-src "Help"))
  382.                 (dest (tackon @default-dest "Help"))
  383.                 (all)
  384.                 (infos)
  385.             )
  386.         ))
  387.         (if (> error 0) (message (#dos-error-mes @ioerr "Help Files")))
  388.  
  389.         (set error (trap 4
  390.             (copyfiles
  391.                 (source (tackon @default-src "Help.info"))
  392.                 (dest @default-dest)
  393.             )
  394.         ))
  395.         (if (> error 0) (message (#dos-error-mes @ioerr "Help.info")))
  396.         (Complete 70)
  397.  
  398.         (if (< kick-ver kick-ver3)
  399.         (
  400.             (set error (trap 4
  401.                 (working #working-aguidelib)
  402.                 (copylib
  403.                     (source (tackon @default-src "Libs/amigaguide.library"))
  404.                     (dest "Libs:")
  405.                 )
  406.             ))
  407.             (if (> error 0) (message (#dos-error-mes @ioerr "amigaguide.library")))
  408.             (Complete 80)
  409.  
  410.             (set error (trap 4
  411.                 (working #working-aguideview)
  412.                 (copyfiles
  413.                     (source (tackon @default-src "Utilities/AmigaGuide"))
  414.                     (dest "Sys:Utilities")
  415.                     (infos)
  416.                 )
  417.             ))
  418.             (if (> error 0) (message (#dos-error-mes @ioerr "AmigaGuide")))
  419.             (Complete 85)
  420.         ))
  421.     ))
  422.  
  423. ;=============================================================================
  424. ; copy example program files
  425.  
  426.     (if (IN parts 3)
  427.     (
  428.         (set error (trap 4
  429.             (working #working-examples)
  430.             (copyfiles
  431.                 (source (tackon @default-src "Programs"))
  432.                 (dest (tackon @default-dest "Programs"))
  433.                 (all)
  434.                 (infos)
  435.             )
  436.         ))
  437.         (if (> error 0) (message (#dos-error-mes @ioerr "Example Programs")))
  438.  
  439.         (set error (trap 4
  440.             (copyfiles
  441.                 (source (tackon @default-src "Programs.info"))
  442.                 (dest @default-dest)
  443.             )
  444.         ))
  445.         (if (> error 0) (message (#dos-error-mes @ioerr "Programs.info")))
  446.         (Complete 95)
  447.     ))
  448.  
  449. ;=============================================================================
  450. ; modify user-startup
  451.  
  452.     (working #working-startup)
  453.     (set assign-path ("Assign AmigaFlight: %s" @default-dest))
  454.     (makeassign "AmigaFlight" @default-dest)
  455.  
  456.     (set error (trap 4
  457.         (startup @app-name
  458.             (prompt ("%s%s%s"
  459.                  #assign-mes1
  460.                  assign-path
  461.                  #assign-mes2)
  462.             )
  463.             (command ("Assign AmigaFlight: \"%s\"\n" @default-dest))
  464.             (help @startup-help)
  465.         )
  466.     ))
  467.     (if (> error 0) (message (#dos-error-mes2 @ioerr "User-Startup")))
  468.     (Complete 100)
  469.  
  470. ;=============================================================================
  471. ; exit with a final message
  472.  
  473.     (exit (#exit-mes))
  474.  
  475. ))
  476.  
  477.  
  478.  
  479. ;=============================================================================
  480. ;=============================================================================
  481. ;=============================================================================
  482. ; Floppy Disk Installation.
  483.  
  484. (if (= install-type 1)
  485. (
  486.     (set wbdisk "Workbench3.0")
  487.     (if (< kick-ver kick-ver3) (set wbdisk "Workbench2.0"))
  488.  
  489. ;=============================================================================
  490. ; make sure user knows they need original workbench disks
  491.  
  492.     (message #original-disks)
  493.  
  494. ;=============================================================================
  495. ; copy some workbench programs to ram
  496.     
  497.     (askdisk
  498.         (dest wbdisk)
  499.         (prompt #ask-disk1 wbdisk #ask-disk2)
  500.         (help #ask-wbdisk-help @askdisk-help)
  501.     )
  502.  
  503.     (copyfiles
  504.         (source ("%s:%s" wbdisk "system/format"))
  505.         (dest "ram:")
  506.         (nogauge)
  507.     )
  508.  
  509.     (copyfiles
  510.         (source ("%s:%s" wbdisk "c/install"))
  511.         (dest "ram:")
  512.         (nogauge)
  513.     )
  514.     
  515. ;=============================================================================
  516. ; select destination drive
  517.  
  518.     (set dest-drive-num (askchoice
  519.         (prompt #select-drive)
  520.         (choices "df0:" "df1:" "df2:" "df3:")
  521.         (default 0)
  522.         (help #select-drive-help)
  523.     ))
  524.     (if (= dest-drive-num 0) (set dest-drive "df0:"))
  525.     (if (= dest-drive-num 1) (set dest-drive "df1:"))
  526.     (if (= dest-drive-num 2) (set dest-drive "df2:"))
  527.     (if (= dest-drive-num 3) (set dest-drive "df3:"))
  528.  
  529. ;=============================================================================
  530. ; format and install destination drive
  531.  
  532.     (message ("%s%s%s%s%s" #insert-disk dest-drive #insert-disk-mes1 dest-drive #insert-disk-mes2))
  533.     (working #format-mes dest-drive)
  534.     (run ("ram:format drive %s name AmigaFlight noicons FFS" dest-drive))
  535.     (run ("ram:install %s" dest-drive))
  536.     (set @default-dest "AmigaFlight:")
  537.  
  538. ;=============================================================================
  539. ; should the disk be a bootable standalone or just AmigaFlight?
  540.  
  541.     (set stand-alone
  542.         (askbool
  543.             (prompt #ask-stand-alone)
  544.             (help #ask-stand-help)
  545.             (default 1)
  546.         )
  547.     )
  548.  
  549. ;=============================================================================
  550. ; create complete disk?
  551.  
  552.     (if (= stand-alone 1)
  553.     (
  554.  
  555. ;=============================================================================
  556. ; create directories on destination drive
  557.  
  558.         (working #creating-dirs)
  559.  
  560.         (set n 0)
  561.         (while (set dir-name (select n "S" "C" "L" "Libs" "Devs" "Devs/Printers" "Devs/Keymaps" "Utilities" "System" "Prefs" "Prefs/Presets" "Prefs/Env-Archive" "Prefs/Env-Archive/sys" ""))
  562.         (
  563.             (set n (+ n 1))
  564.             (makedir (tackon "AmigaFlight:" dir-name))
  565.         ))
  566.  
  567.         (if (>= kick-ver kick-ver3)
  568.         (
  569.             (set n 0)
  570.             (while (set dir-name (select n "Devs/DataTypes" "Devs/DOSDrivers" "Devs/Monitors" "Classes" "Classes/DataTypes" ""))
  571.             (
  572.                 (set n (+ n 1))
  573.                 (makedir (tackon "AmigaFlight:" dir-name))
  574.             ))
  575.         )
  576.         (
  577.             (makedir "AmigaFlight:Monitors")
  578.         ))
  579.  
  580. ;=============================================================================
  581. ; make sure workbench disk is still available
  582.  
  583.         (askdisk
  584.             (dest wbdisk)
  585.             (prompt #ask-disk1 wbdisk #ask-disk2)
  586.             (help #ask-wbdisk-help)
  587.         )
  588.  
  589. ;=============================================================================
  590. ; copy miscellaneous icons to AmigaFlight disk
  591.  
  592.         (if (< kick-ver kick-ver3)
  593.         (
  594.             (set n 0)
  595.             (while (set file-name (select n "Monitors.info" "Shell.info" ""))
  596.             (
  597.                 (set n (+ n 1))
  598.                 (copyfiles
  599.                     (source ("%s:%s" wbdisk file-name))
  600.                     (dest "AmigaFlight:")
  601.                 )
  602.             ))
  603.         ))
  604.  
  605.         (copyfiles
  606.             (source ("%s:%s" wbdisk "Prefs.info"))
  607.             (dest "AmigaFlight:")
  608.         )
  609.  
  610. ;=============================================================================
  611. ; copy workbench startup-sequence to AmigaFlight disk
  612.  
  613.         (set error (trap 4
  614.             (copyfiles
  615.                 (source ("%s:%s" wbdisk "S/Startup-Sequence"))
  616.                 (dest "AmigaFlight:S")
  617.             )
  618.         ))
  619.         (if (> error 0) (message (#dos-error-mes @ioerr "Startup-Sequence")))
  620.     
  621.  
  622. ;=============================================================================
  623. ; copy workbench c directory to AmigaFlight disk
  624.  
  625.         (working #copying-c)
  626.  
  627.         (set n 0)
  628.         (while (set file-name (select n "AddBuffers" "Assign" "BindDrivers" "ConClip" "Copy" "Delete" "Dir" "Ed" "Execute" "IPrefs" "List" "LoadWB" "MakeDir" "Mount" "Rename" "SetClock" "SetPatch" "Status" "Type" "Version" ""))
  629.         (
  630.             (set n (+ n 1))
  631.             (set error (trap 4
  632.                 (copyfiles
  633.                     (source ("%s:%s%s" wbdisk "C/" file-name))
  634.                     (dest "AmigaFlight:C")
  635.                 )
  636.             ))
  637.             (if (> error 0) (message (#dos-error-mes @ioerr file-name)))
  638.         ))
  639.  
  640.         (if (>= kick-ver kick-ver3)
  641.         (
  642.             (set error (trap 4
  643.                 (copyfiles
  644.                     (source ("%s:%s" wbdisk "C/AddDataTypes"))
  645.                     (dest "AmigaFlight:C")
  646.                 )
  647.             ))
  648.             (if (> error 0) (message (#dos-error-mes @ioerr "AddDataTypes")))
  649.         ))
  650.  
  651. ;=============================================================================
  652. ; copy workbench libraries to AmigaFlight disk
  653.  
  654.         (working #copying-libs)
  655.  
  656.         (set n 0)
  657.         (while (set lib-name (select n "asl" "iffparse" "version" ""))
  658.         (
  659.             (set n (+ n 1))
  660.             (set error (trap 4
  661.                 (copylib
  662.                     (source ("%s:%s%s%s" wbdisk "Libs/" lib-name ".library"))
  663.                     (dest "AmigaFlight:Libs")
  664.                 )
  665.             ))
  666.             (if (> error 0) (message (#dos-error-mes @ioerr lib-name)))
  667.         ))
  668.  
  669.         (if (>= kick-ver kick-ver3)
  670.         (
  671.             (set n 0)
  672.             (while (set lib-name (select n "amigaguide" "datatypes" ""))
  673.             (
  674.                 (set n (+ n 1))
  675.                 (set error (trap 4
  676.                     (copylib
  677.                         (source ("%s:%s%s%s" wbdisk "Libs/" lib-name ".library"))
  678.                         (dest "AmigaFlight:Libs")
  679.                     )
  680.                 ))
  681.                 (if (> error 0) (message (#dos-error-mes @ioerr lib-name)))
  682.             ))
  683.         ))
  684.  
  685. ;=============================================================================
  686. ; copy workbench handlers to AmigaFlight disk
  687.  
  688.         (working #copying-handlers)
  689.  
  690.         (set n 0)
  691.         (while (set handler-name (select n "aux" "port" "queue" ""))
  692.         (
  693.             (set n (+ n 1))
  694.             (set error (trap 4
  695.                 (copyfiles
  696.                     (source ("%s:%s%s%s" wbdisk "L/" handler-name "-handler"))
  697.                     (dest "AmigaFlight:L")
  698.                 )
  699.             ))
  700.             (if (> error 0) (message (#dos-error-mes @ioerr handler-name)))
  701.         ))
  702.  
  703.         (if (>= kick-ver kick-ver3)
  704.         (
  705.             (set error (trap 4
  706.                 (copyfiles
  707.                     (source ("%s:%s" wbdisk "L/CrossDOSFileSystem"))
  708.                     (dest "AmigaFlight:L")
  709.                 )
  710.             ))
  711.             (if (> error 0) (message (#dos-error-mes @ioerr "CrossDOSFileSystem")))
  712.         ))
  713.  
  714. ;=============================================================================
  715. ; copy some of workbench devs directory to AmigaFlight disk
  716.  
  717.         (working #copying-devices)
  718.  
  719.         (if (>= kick-ver kick-ver3)
  720.         (
  721.             (set error (trap 4
  722.                 (copyfiles
  723.                     (source ("%s:%s" wbdisk "Devs.info"))
  724.                     (dest "AmigaFlight:")
  725.                 )
  726.             ))
  727.             (if (> error 0) (message (#dos-error-mes @ioerr "Devs.info")))
  728.  
  729.             (set error (trap 4
  730.                 (copyfiles
  731.                     (source ("%s:%s" wbdisk "Devs"))
  732.                     (dest "AmigaFlight:Devs")
  733.                     (pattern "#?.info")
  734.                 )
  735.             ))
  736.             (if (> error 0) (message (#dos-error-mes @ioerr "Devs/#?.info")))
  737.  
  738.             (set error (trap 4
  739.                 (copyfiles
  740.                     (source ("%s:%s" wbdisk "Devs/DataTypes/AmigaGuide"))
  741.                     (dest "AmigaFlight:Devs/DataTypes")
  742.                     (infos)
  743.                 )
  744.             ))
  745.             (if (> error 0) (message (#dos-error-mes @ioerr "AmigaGuide")))
  746.  
  747.             (set error (trap 4
  748.                 (copyfiles
  749.                     (source ("%s:%s" wbdisk "Devs/DOSDrivers/PIPE"))
  750.                     (dest "AmigaFlight:Devs/DOSDrivers")
  751.                     (infos)
  752.                 )
  753.             ))
  754.             (if (> error 0) (message (#dos-error-mes @ioerr "PIPE")))
  755.         ))
  756.  
  757.         (set n 0)
  758.         (while (set dev-name (select n "clipboard" "parallel" "printer" "serial" ""))
  759.         (
  760.             (set n (+ n 1))
  761.             (set error (trap 4
  762.                 (copyfiles
  763.                     (source ("%s:%s%s%s" wbdisk "Devs/" dev-name ".device"))
  764.                     (dest "AmigaFlight:Devs")
  765.                 )
  766.             ))
  767.             (if (> error 0) (message (#dos-error-mes @ioerr dev-name)))
  768.         ))
  769.  
  770.         (set error (trap 4
  771.             (copyfiles
  772.                 (source ("%s:%s" wbdisk "Devs/System-Configuration"))
  773.                 (dest "AmigaFlight:Devs")
  774.             )
  775.         ))
  776.         (if (> error 0) (message (#dos-error-mes @ioerr "System-Configuration")))
  777.  
  778.         (set error (trap 4
  779.             (copyfiles
  780.                 (source ("%s:%s" wbdisk "Devs/Printers/Generic"))
  781.                 (dest "AmigaFlight:Devs/Printers")
  782.                 (infos)
  783.             )
  784.         ))
  785.         (if (> error 0) (message (#dos-error-mes @ioerr "System-Configuration")))
  786.  
  787. ;=============================================================================
  788. ; copy some of workbench classes directory to AmigaFlight disk
  789.  
  790.         (if (>= kick-ver kick-ver3)
  791.         (
  792.             (set error (trap 4
  793.                 (copyfiles
  794.                     (source ("%s:%s" wbdisk "Classes/DataTypes/amigaguide.datatype"))
  795.                     (dest "AmigaFlight:Classes/DataTypes")
  796.                 )
  797.             ))
  798.             (if (> error 0) (message (#dos-error-mes @ioerr "amigaguide.datatype")))
  799.         ))
  800.  
  801. ;=============================================================================
  802. ; copy some of workbench system directory to AmigaFlight disk
  803.  
  804.         (working #copying-system)
  805.  
  806.         (set error (trap 4
  807.             (copyfiles
  808.                 (source ("%s:%s" wbdisk "System.info"))
  809.                 (dest "AmigaFlight:")
  810.             )
  811.         ))
  812.         (if (> error 0) (message (#dos-error-mes @ioerr "System.info")))
  813.  
  814.         (set error (trap 4
  815.             (copyfiles
  816.                 (source ("%s:%s" wbdisk "System/CLI"))
  817.                 (dest "AmigaFlight:System")
  818.                 (infos)
  819.             )
  820.         ))
  821.         (if (> error 0) (message (#dos-error-mes @ioerr "CLI")))
  822.  
  823.         (set error (trap 4
  824.             (copyfiles
  825.                 (source ("%s:%s" wbdisk "System/DiskCopy"))
  826.                 (dest "AmigaFlight:System")
  827.                 (infos)
  828.             )
  829.         ))
  830.         (if (> error 0) (message (#dos-error-mes @ioerr "DiskCopy")))
  831.  
  832.         (if (>= kick-ver kick-ver3)
  833.         (
  834.             (set error (trap 4
  835.                 (copyfiles
  836.                     (source ("%s:%s" wbdisk "System/Shell.info"))
  837.                     (dest "AmigaFlight:System")
  838.                 )
  839.             ))
  840.             (if (> error 0) (message (#dos-error-mes @ioerr "Shell.info")))
  841.         ))
  842.  
  843. ;=============================================================================
  844. ; copy some of workbench utilities directory to AmigaFlight disk
  845.  
  846.         (working #copying-utils)
  847.  
  848.         (set error (trap 4
  849.             (copyfiles
  850.                 (source ("%s:%s" wbdisk "Utilities.info"))
  851.                 (dest "AmigaFlight:")
  852.             )
  853.         ))
  854.         (if (> error 0) (message (#dos-error-mes @ioerr "Utilities.info")))
  855.  
  856.         (if (>= kick-ver kick-ver3)
  857.         (
  858.             (set error (trap 4
  859.                 (copyfiles
  860.                     (source ("%s:%s" wbdisk "Utilities/MultiView"))
  861.                     (dest "AmigaFlight:Utilities")
  862.                     (infos)
  863.                 )
  864.             ))
  865.             (if (> error 0) (message (#dos-error-mes @ioerr "MultiView")))
  866.         ))
  867.  
  868. ;=============================================================================
  869. ; copy some DOSDrivers and and a keymap from storage disk to AmigaFlight disk
  870.  
  871.         (if (>= kick-ver kick-ver3)
  872.         (
  873.             (askdisk
  874.                 (prompt #ask-disk1 "Storage3.0" #ask-disk2)
  875.                 (dest "Storage3.0")
  876.                 (help #ask-storage-help @askdisk-help)
  877.             )
  878.  
  879.             (set error (trap 4
  880.                 (copyfiles
  881.                     (source ("Storage3.0:DOSDrivers"))
  882.                     (dest "AmigaFlight:Devs/DOSDrivers")
  883.                     (pattern "PC#?")
  884.                     (infos)
  885.                 )
  886.             ))
  887.             (if (> error 0) (message (#dos-error-mes @ioerr "DOSDrivers")))
  888.  
  889.             (set error (trap 4
  890.                 (copyfiles
  891.                     (source ("Storage3.0:Keymaps/gb"))
  892.                     (dest "AmigaFlight:Devs/Keymaps")
  893.                     (infos)
  894.                 )
  895.             ))
  896.             (if (> error 0) (message (#dos-error-mes @ioerr "gb keymap")))
  897.         ))
  898.     ))
  899.  
  900. ;=============================================================================
  901. ; find out which parts to install
  902.  
  903.     (set parts (askoptions
  904.         (prompt #ask-parts)
  905.         (choices #amigaflight #include-assem #help-files #examples)
  906.         (help #ask-parts-help)
  907.     ))
  908.  
  909.     (askdisk
  910.         (dest @default-vol)
  911.         (prompt #ask-disk1 @default-vol ":" #ask-disk2)
  912.         (help @askdisk-help)
  913.     )
  914.  
  915. ;=============================================================================
  916. ; copy main control program, amigaflight.library, and lowlevel.library
  917.  
  918.     (if (IN parts 0)
  919.     (
  920.         (set error (trap 4
  921.             (working #working-control)
  922.             (copyfiles
  923.                 (source (tackon @default-src "AmigaFlight"))
  924.                 (dest "AmigaFlight:")
  925.                 (infos)
  926.             )
  927.         ))
  928.         (if (> error 0) (message (#dos-error-mes @ioerr "AmigaFlight")))
  929.  
  930.         (set error (trap 4
  931.             (copyfiles
  932.                 (source (tackon @default-src "FlightPrefs"))
  933.                 (dest "AmigaFlight:")
  934.                 (infos)
  935.             )
  936.         ))
  937.         (if (> error 0) (message (#dos-error-mes @ioerr "FlightPrefs")))
  938.  
  939.         (set error (trap 4
  940.             (working #working-aflightlib)
  941.             (copylib
  942.                 (source (tackon @default-src "Libs/amigaflight.library"))
  943.                 (dest "AmigaFlight:Libs")
  944.             )
  945.         ))
  946.         (if (> error 0) (message (#dos-error-mes @ioerr "amigaflight.library")))
  947.  
  948.         (set error (trap 4
  949.             (working #working-lowlevellib)
  950.             (copylib
  951.                 (source (tackon @default-src "Libs/lowlevel.library"))
  952.                 (dest "AmigaFlight:Libs")
  953.             )
  954.         ))
  955.         (if (> error 0) (message (#dos-error-mes @ioerr "lowlevel.library")))
  956.     ))
  957.  
  958. ;=============================================================================
  959. ; copy includes and assembling tools
  960.  
  961.     (if (IN parts 1)
  962.     (
  963.         (set error (trap 4
  964.             (working #working-includes)
  965.             (copyfiles
  966.                 (source (tackon @default-src "Includes"))
  967.                 (dest "AmigaFlight:Includes")
  968.                 (all)
  969.             )
  970.         ))
  971.         (if (> error 0) (message (#dos-error-mes @ioerr "Includes")))
  972.  
  973.         (set error (trap 4
  974.             (working #working-tools)
  975.             (copyfiles
  976.                 (source (tackon @default-src "C/A68k"))
  977.                 (dest "AmigaFlight:C")
  978.             )
  979.         ))
  980.         (if (> error 0) (message (#dos-error-mes @ioerr "A68k")))
  981.  
  982.         (set error (trap 4
  983.             (copyfiles
  984.                 (source (tackon @default-src "C/xasm"))
  985.                 (dest "AmigaFlight:C")
  986.             )
  987.         ))
  988.         (if (> error 0) (message (#dos-error-mes @ioerr "xasm")))
  989.     ))
  990.  
  991. ;=============================================================================
  992. ; copy amigaguide help files and amigaguide.library
  993.  
  994.     (if (IN parts 2)
  995.     (
  996.         (set error (trap 4
  997.             (working #aguide-help)
  998.             (copyfiles
  999.                 (source (tackon @default-src "Help"))
  1000.                 (dest ("AmigaFlight:Help"))
  1001.                 (all)
  1002.                 (infos)
  1003.             )
  1004.         ))
  1005.         (if (> error 0) (message (#dos-error-mes @ioerr "Help Files")))
  1006.  
  1007.         (if (< kick-ver kick-ver3)
  1008.         (
  1009.             (set error (trap 4
  1010.                 (working #working-aguidelib)
  1011.                 (copylib
  1012.                     (source (tackon @default-src "Libs/amigaguide.library"))
  1013.                     (dest "AmigaFlight:Libs")
  1014.                 )
  1015.             ))
  1016.             (if (> error 0) (message (#dos-error-mes @ioerr "amigaguide.library")))
  1017.  
  1018.             (set error (trap 4
  1019.                 (working #working-aguideview)
  1020.                 (copylib
  1021.                     (source (tackon @default-src "Utilities/AmigaGuide"))
  1022.                     (dest "AmigaFlight:Utilities")
  1023.                     (infos)
  1024.                 )
  1025.             ))
  1026.             (if (> error 0) (message (#dos-error-mes @ioerr "AmigaGuide")))
  1027.         ))
  1028.     ))
  1029.  
  1030. ;=============================================================================
  1031. ; copy example program files
  1032.  
  1033.     (if (IN parts 3)
  1034.     (
  1035.         (set error (trap 4
  1036.             (working #working-examples)
  1037.             (copyfiles
  1038.                 (source (tackon @default-src "Programs"))
  1039.                 (dest ("AmigaFlight:Programs"))
  1040.                 (all)
  1041.                 (infos)
  1042.             )
  1043.         ))
  1044.         (if (> error 0) (message (#dos-error-mes @ioerr "Example Programs")))
  1045.     ))
  1046.     (Complete 100)
  1047.  
  1048. ;=============================================================================
  1049. ; exit with a final message
  1050.  
  1051.     (exit (#exit-mes))
  1052.  
  1053. ))
  1054.